/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author hoang.pt
 */
public class MyRunnable implements Runnable{

    public MyRunnable() {
    }
    
    /**
     * 
     */
    public void run() {
        for (int i=1; i<= 5; i++) {
            Thread t= Thread.currentThread();
            t.setName("Thread Runnable kkkkkkk");
            System.out.println("Thread is: " + t.getName());
            System.out.println("State of thread is: " + t.getState());
            System.out.println("Active running thread: " +t.activeCount());
        }

        System.out.println("My Runnable: " + Thread.currentThread().getName());

        //throw new UnsupportedOperationException("Not supported yet.");
    }

}
